﻿<UserControl  
    x:Class="UCCLIGHT2.FileUpload.FileUpload"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:UCCLIGHT2.FileUpload;assembly=UCCLIGHT2.FileUpload" x:Name="MainPageUC"
    Width="600" Height="600">
    <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="False">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"></ColumnDefinition>
            <ColumnDefinition Width="315"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="100" />
            <RowDefinition Height="90" />
            <RowDefinition Height="0" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal"  Grid.Column="1" Grid.Row="0"  Width="Auto">
            <TextBlock Text="파일이름" Width="180" Margin="15,0,0,0" />
            <TextBlock Text="상태" Width="50"/>
            <TextBlock Text="사이즈" Width="50" TextAlignment="Right"/>

        </StackPanel>
        <Border BorderBrush="Black"  BorderThickness="1, 1, 1, 1" Grid.Column="2" Grid.Row="1" Padding="2">
            <StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Background="White">
                    <TextBlock x:Name="FileNameTextBlock" Height="20" Width="180" Margin="5,0,0,0"  />
                    <TextBlock x:Name="StateTextBlock" Height="20" Width="60"/>
                    <TextBlock x:Name="FileSizeTextBlock" Height="20" Width="60" TextAlignment="Right" Margin="0,0,5,0" />
                </StackPanel>
                <TextBlock Foreground="Red" x:Name="ErrorMsgTextBlock" Visibility="Collapsed">Upload failed.</TextBlock>
            </StackPanel>
        </Border>

        <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" Margin="0,5,0,-10"  Width="310" Grid.RowSpan="2">
            <Button x:Name="btnUpload" Content="파일 업로드" Click="btnUpload_Click" Width="200" Height="30"></Button>
            <TextBlock x:Name="txtMessage" Foreground="Red" Text="Choose File" Height="30"></TextBlock>
            <ProgressBar x:Name="progressUpload" Minimum="0" Maximum="1" Width="300" Height="25"></ProgressBar>
        </StackPanel>

    </Grid>
</UserControl>
